#!/bin/sh

# This function will return the code name of the Linux host release to the caller
get_host_type() {
    local  __host_type=$1
    local  the_host=`lsb_release -a 2>/dev/null | grep Codename: | awk {'print $2'}`
    eval $__host_type="'$the_host'"
}

# This function returns the version of the Linux host to the caller
get_host_version() {
    local  __host_ver=$1
    local  the_version=`lsb_release -a 2>/dev/null | grep Release: | awk {'print $2'}`
    eval $__host_ver="'$the_version'"
}


echo
echo "--------------------------------------------------------------------------------"
echo "Verifying Linux host distribution"

get_host_type host

if [ "$host" != "focal" ]; then
    echo "Unsupported host Linux. Only Ubuntu 20.04 LTS is supported"
    exit 1
fi
echo "Ubuntu 20.04 LTS is being used, continuing.."
echo "--------------------------------------------------------------------------------"
echo

